/*
 * Class.h
 *
 *  Created on: Aug 5, 2009
 *      Author: ramesh
 */

#ifndef _COMPOSER_CLASS_H_
#define _COMPOSER_CLASS_H_

#include "Entity.h"
#include "Scope.h"
#include "Method.h"

#include "../../Shared.h"


namespace SymphonyAST {


class Class : public Scope, public Entity {
private:
	map<string, Variable*> members;
	map<string, Method*> methods;
	vector<string> membersList;
	vector<string> methodsList;
	vector<string> importeds;
	set<string> properties;
	int importIndex;
	string name;

public:
	Class() {
		for (int i = 0; i <= PrimitiveTypes::NUMBER_OF_PRIMITIVES; i++) {
			importeds.push_back(PrimitiveTypes::KEYWORDS[i]);
		}
	}

	string getId() {
		return "class";
	}

	string getName();
	void setName(const string& name);

    void import(const string& toImport);
    int getImportedId(const string& imported);

    void addMethod(const string& name, Method* method);
    Method* getMethod(const string& name);
    int getMethodId(const string& name);
    map<string, Method*> getMethods();

    vector<string> getMethodsIds();

    void addMember(string name, Variable* member);
};


}

#endif /* _COMPOSER_CLASS_H_ */
